//
//  ZCSTabBarController.m
//  聆听FM
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Dark. All rights reserved.

#import "ZCSTabBarController.h"
#import "LTFindViewController.h"
//#import "LTMyViewController.h"
#import "LJLMyVC.h"
#import "LTCollectListenViewController.h"
#import "LTDownloadListenViewController.h"
@interface ZCSTabBarController ()



@end

@implementation ZCSTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
#pragma mark -- 发现

    UINavigationController *findNav = [LTFindViewController defaultFindUINavigationController];
    [self setChildController:findNav imageName:@"tabbar_find_n" selectedImage:@"tabbar_find_h"];

#pragma mark -- 中间

//    UIViewController *VC = [UIViewController new];
//    [self setChildController:VC imageName:nil selectedImage:nil];

#pragma mark -- 订阅听
    
    UINavigationController *collectNav = [LTCollectListenViewController defaultCollectViewUINavigationController];
    [self setChildController:collectNav imageName:@"tabbar_sound_n" selectedImage:@"tabbar_sound_h"];
#pragma mark -- 我的

   // UINavigationController *myNav = [LJLMyVC defaultMyCenterNavigationController];
  //  [self setChildController:myNav imageName:@"tabbar_me_n" selectedImage:@"tabbar_me_h"];
}
#pragma mark -- 设置各个item对应页面的主控制器并设置tabBar属性:
- (void)setChildController:(UIViewController *)vc imageName:(NSString *)imageName selectedImage:(NSString *)selectedImageName {
    // 创建tabbarItem并设置图片不被渲染
    vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:nil image:[[UIImage imageNamed:imageName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:selectedImageName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    // 设置图片间距
    vc.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
    [self addChildViewController:vc];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
